<template>
  <el-dialog
    v-model="centerDialogVisible"
    width="50%"
    align-center
    color="white"
    style="background-color: #7a7e8473; height:63%"
  >
    <h1 style="color: white">用户详情</h1>
    <div @click="changecover" style="margin-left: -71%; margin-top: 3%">
      <el-avatar :src="user.cover" :size="100"> </el-avatar>
      <span
        style="
          color: white;
          margin-top: -1%;
          position: absolute;
          margin-left: 10%;
          font-size: 21px;
          font-size: 23px;
          text-align: left;
        "
        >用户名：{{ user.userName }}</span
      >
      <span
        style="
          color: white;
          margin-top: 4%;
          position: absolute;
          margin-left: 10%;
          font-size: 21px;
          font-size: 23px;
          text-align: left;
        "
        >用户地址：{{ user.address }}</span
      >
      <span
        style="
          color: white;
          margin-top: 9%;
          position: absolute;
          margin-left: 10%;
          font-size: 21px;
          font-size: 23px;
          text-align: left;
        "
        >用户电话：{{ user.phone }}</span
      >
      <span
        style="
          color: white;
          margin-top: 14%;
          position: absolute;
          margin-left: 10%;
          font-size: 21px;
          font-size: 23px;
          text-align: left;
        "
        v-if="user.roleId == 2 ? (shenfen = '用户') : '商家'"
        >用户身份：{{ shenfen }}</span
      >
      <span
        style="
          color: white;
          margin-top: 19%;
          position: absolute;
          margin-left: 10%;
          font-size: 21px;
          font-size: 23px;
          text-align: left;
        "
        v-if="user.vip == 1 ? (vip = '是') : (vip = '否')"
        >会员：{{ vip }}</span
      >
    </div>
  </el-dialog>
</template>
  <script>
export default {
  name: "UserDetail",
  data() {
    return {
      centerDialogVisible: false,
      user: [],
      shenfen: "",
      vip: "",
    };
  },
  methods: {},
};
</script>